<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>错误页面</title>
    <style>
        body{
            background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
        }
        span{
            color: red;
            font-size:25px;
            display: inline-block;
        }
        span:hover{
            cursor: pointer;
            color: blue;
        }
        button{
            width: auto;
            padding: 0 10px;height: 30px;
            line-height: 30px;
            background-color: #a1c4fd;
            color: white;
            border: none;
            border-radius: 5px;
            margin-left: 10px;

        }
        button:hover{
            cursor: pointer;
            color: rgb(243, 11, 30);
        }
        h1{
            text-align: center;
            color: azure;
        }
        h2{
            text-align: center;
        }
        .btns{
            margin: 0 auto;
            height: 50px;line-height: 50px;
            width: auto;
            text-align: center;
            transform: translateY(-80px);
        }
        img{
            display: block;
            margin:0 auto;
            width: 50%;
            height: auto;
            border-radius: 50px;
        }
        
    </style>
</head>
<body>
    <h1>错误页面</h1>
    <!-- <h2>{{err?err:""}}</h2>
    <h2>{{msg?msg:""}}</h2> -->
    <img src="/static/admin/img/500.png" alt="">
    <div class="btns">
        <span onclick="fun()"> <b>6</b> 秒后返回上个页面</span>
        <button onclick="cancleFun()">取消</button>
    </div>

    <script>
        let span = document.querySelector('span');
        let time=6;
        let timer = setInterval(function(){
            if(time>0){
                time--;
                span.innerHTML = `<b>${time}</b> 秒后返回上个页面`
            }else{
                window.history.back();
            }
        },1000)
        function cancleFun(){
            clearInterval(timer);
            // alert("asdas")
        }
        // setTimeout(function(){
        //     // location.href="login"
        //     window.history.back();  
        // },6000)
        function fun(){
            window.history.back();  
        }
    </script>
</body>
</html>